package guardian

import (
	"github.com/Unixeno/islands/pb"
	"github.com/golang/protobuf/ptypes/empty"
	"golang.org/x/net/context"
)

var BuildTime string
var GitCommit string
var GoVersion string
var OSArch string

func (s *server) Version(ctx context.Context, _ *empty.Empty) (*pb.VersionResp, error) {
	return &pb.VersionResp{
		Version:    "0.1.0",
		ApiVersion: "0.1",
		GoVersion:  GoVersion,
		GitCommit:  GitCommit,
		Built:      BuildTime,
		Arch:       OSArch,
	}, nil
}
